// 拼后台传过来的listjson并插入到表格中
function updateList(data){
    var dataL = data.length;
    var html = "";
    for(var i = 0; i < dataL; i++){
        html = html + "<tr>"
            +  "<td>" + zhigong.undefinedHandler(data[i].bmbh) + "</td>"
            +  "<td>" + zhigong.undefinedHandler(data[i].mc) + "</td>"
            +  "<td>" + zhigong.undefinedHandler(data[i].bz) + "</td>"
            +  "<td>"
            +  "<a href=\"javascript:zhigong.openModal('bumen','view'," + data[i].bmbh  +")\" class=\"btn btn-primary btn-xs btn-margin\" >查看</a>"
            +  "<a href=\"javascript:zhigong.openModal('bumen','update'," + data[i].bmbh + ")\" class=\"btn btn-info btn-xs btn-margin\">修改</a>"
            +  "<a href=\"javascript:zhigong.deleteData('bumen', " + data[i].bmbh + ")\"  class=\"btn btn-danger btn-xs btn-margin\">删除</a>"
            +  "</td>"
            +"</tr>";
    }

    var tbodyList = $("#tbodyList");
    tbodyList.html(html);
}

$(function(){
    // 初始化加载列表数据
    zhigong.pageData("bumen", 1, true);
})